# coding=utf-8
import allure
from appium.webdriver.common.appiumby import AppiumBy

from app_auto_po.basepage.app import WeWorkApp
from app_auto_po.page.address_page import AddressPage
from app_auto_po.utils.log_util import logger

"""
首页
"""
class MainPage(WeWorkApp):

    # 通讯录
    __CONTACT = AppiumBy.XPATH, '//*[@text="通讯录"]'


    @allure.step("点击通讯录，跳转到通讯录页面")
    def address_page(self):
        """
        点击通讯录，跳转到通讯录页面
        :return:
        """
        logger.info("点击通讯录，跳转到通讯录页面")
        self.click(*self.__CONTACT)
        return AddressPage(self.driver)